<?php
$this->pageTitle=Yii::app()->name . ' - 登录';
?>
<div class='row  div div-plain'>
<div class="form span6">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'login-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
	'htmlOptions'=>	array('class'=>'form-horizontal')
	
)); ?>

<fieldset  class='div div-plain'>
	<div class='div'><h2>登录</h2></div>
		
	<div class="control-group">
		<label class='control-label'><?php echo $form->labelEx($model,'username'); ?></label>
		<div class="controls">
		<?php echo $form->textField($model,'username'); ?>
			<?php if($model->getError('username')):?>
			<span class="label important"><?php echo $form->error($model,'username'); ?>
			</span>
			<?php endif;?>
		</div>
	</div>
	
	<div class="control-group">
		<label class='control-label'><?php echo $form->labelEx($model,'password'); ?></label>
		<div class="controls">
		<?php echo $form->passwordField($model,'password'); ?>
			<?php if($model->getError('password') ):?>
			<span class="label important"><?php echo $form->error($model,'password'); ?>
			</span>
			<?php endif;?>
		</div>
	</div>

	<div class="control-group">
		<label class='control-label'><?php echo $form->label($model,'rememberMe'); ?></label>
		<div class="controls">
		<?php echo $form->checkBox($model,'rememberMe'); ?>
		</div>
	</div>

	<div class="form-actions">
		<?php echo CHtml::submitButton('登录',array("class"=>"btn btn-primary")); ?>
	</div>
</fieldset>
<?php $this->endWidget(); ?>
</div><!-- form -->

<div class='span5'>
<?php 
/*
$facebook = new Facebook(Constants::$facebook_config);
$loginUrl = $facebook->getLoginUrl(array('redirect_uri' => CController::createAbsoluteUrl("site/login")));
$image = CHtml::image(Yii::app()->request->baseUrl."/images/common/facebook-login.png");
echo "<a href='$loginUrl'>$image</a>";
*/
?>
</div>
</div>